<?
include_once 'include/include.php';
c_create::createClass('adv');
$adv = new adv();
$outvar[headline] = '添加广告管理';
if ($_POST){
	if ($adv->submitRecord($_POST)){
		$_SESSION[showtips]	 = $adv->action.'成功！';
		header('location:Adv_manage.php');
		exit;
	}else {
		$_SESSION[showtips]	 = $adv->action.'失败！';
		assignMore($adv->error);
	}
}elseif ($_GET[id]){
	$_POST = $adv->getOneRecord($_GET[id]);
}
assignMore($_POST);
$outvar[catalog] = $adv->getTypeList(1);

require_once("./include/xajax_common.php");
$outvar[xajax_javascript] = $xajax->getJavascript('../lib/xajax/');

outFile("adv_add");
?>